package responsibility.filter;

import responsibility.chain.FilterChain;
import responsibility.http.Request;
import responsibility.http.Respones;

public abstract class HttpRequestAndResponesFilter implements Filter {
    private FilterChain filterChain;


    @Override
    public void doFilter(Request request, Respones response) {
        doRequest(request);
        filterChain.doFilter(request, response);
        doRespones(response);

    }

    abstract void doRequest(Request request);

    abstract void doRespones(Respones response);


    public void setFilterChain(FilterChain filterChain) {
        this.filterChain = filterChain;
    }
}
